﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Newtonsoft.Json;
using System.Windows.Forms;
using System.IO;
using System.Xml;

namespace ClickrDesktop.Helpers
{
    public static class XML_Json_Parser
    {
        public static XmlDocument Json_To_XML_Conversion(String json)
        {
            XmlDocument XDoc = new XmlDocument();
            try { XDoc = (XmlDocument)JsonConvert.DeserializeXmlNode(json, "parent"); }
            catch (Exception ex) { XDoc = null; Managers.LogManager.EnterInLogFile(String.Format("Exception \n{0}\n{1}", ex.Message, ex.StackTrace)); }
            return XDoc;
        }
    }
}
